package framework.elements;

import org.openqa.selenium.By;

/**
 * Button class.
 */
public class Button extends BaseElement {

    /**
     * Main Constructor.
     * @param locator
     *            Button locator
     * @param name
     *            Button name
     */
    public Button(final By locator, final String name) {
        super(locator, name);
    }

    protected String getElementType() {
        return "Button";
    }

    public final boolean isEnabled() {

        return (this.getElement().isEnabled() && (!this.getElement()
                .getAttribute("class").contains("disabled")));
    }
}
